<script type="text/javascript">
<!--
var quick = false;

function activateAdvancedQuery()
{
	quick = !quick;

	document.getElementById("tableKarmaSearch").style.display = (quick ? "" : "none");

	if (quick) {
		document.location = "#quick";
	}
}
-->
</script>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
		<td colspan="3">
			<table width="100%">
				<tr>
					<td align="left"><span class="nav"><a class="nav" href="${JForumContext.encodeURL("/forums/list")}">${I18n.getMessage("ForumListing.forumIndex")}</a></span></td>
					<td align="right">&nbsp;<!--
						<img src="${contextPath}/templates/${templateName}/images/icon_mini_message.gif" align="middle">
						<span class="nav"><a href="javascript:activateAdvancedQuery()">${I18n.getMessage("Karma.advancedQuery")}</a></span>-->
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table align="center" cellspacing="0" cellpadding="0" bgcolor="FFFFFF" width="100%" border="0" style="display: none;" id="tableKarmaSearch">
	<tr>
		<td>
			<form action="${JForumContext.encodeURL("/jforum")}" method="post" name="searchByMonthForm" id="post">
			<input type="hidden" name="action" value="searchByMonth" />
			<input type="hidden" name="module" value="karma" />
			<table class="forumline" width="100%" align="center">				
				<tr>
					<th class="thtop" align="left">
						<b>${I18n.getMessage("Karma.advancedQuery")}</b>
					</th>
				</tr>
				
				<tr>
					<td><span class="gen"><b>${I18n.getMessage("Karma.queryByMonth")}:</b></span></td>
				</tr>
				
				<tr>
					<td>
						<span class="gen">
						${I18n.getMessage("Karma.month")}:
						<select name="month">
							<option value="01">${I18n.getMessage("january")}</option>
							<option value="02">${I18n.getMessage("february")}</option>
							<option value="03">${I18n.getMessage("march")}</option>
							<option value="04">${I18n.getMessage("april")}</option>
							<option value="05">${I18n.getMessage("may")}</option>
							<option value="06">${I18n.getMessage("june")}</option>
							<option value="07">${I18n.getMessage("july")}</option>
							<option value="08">${I18n.getMessage("august")}</option>
							<option value="09">${I18n.getMessage("september")}</option>
							<option value="10">${I18n.getMessage("october")}</option>
							<option value="11">${I18n.getMessage("november")}</option>
							<option value="12">${I18n.getMessage("december")}</option>
						</select> &nbsp;
						${I18n.getMessage("Karma.year")}:<input class="post" type="text" maxlength="10" size="15" name="year" value="2005"/>
						</span>
					</td>
				</tr>

				<tr>
					<td>
						<span class="gen">
						${I18n.getMessage("Karma.orderBy")}:&nbsp;
						<input type="radio" name="order_by" value="total" checked="checked"/> ${I18n.getMessage("Karma.totalReceived")}
						&nbsp;<input type="radio" name="order_by" value="votes_received"/> ${I18n.getMessage("Karma.votesReceived")}
						&nbsp;<input type="radio" name="order_by" value="votes_given"/> ${I18n.getMessage("Karma.votesGiven")}
						&nbsp;<input type="radio" name="order_by" value="user_karma"/> ${I18n.getMessage("Karma.karma")}
						</span>
					</td>
				</tr>

				<tr>
					<td align="center" >
						<input type="submit" value="${I18n.getMessage("PostForm.submit")}" class="mainoption" />
					</td>
				</tr>		
			</table>
			</form>

				<form action="${JForumContext.encodeURL("/jforum")}" method="post" name="searchByPeriodForm" id="post2">
				<input type="hidden" name="action" value="searchByPeriod" />
				<input type="hidden" name="module" value="karma" />
			<table class="forumline" width="100%" align="center">				

				<tr>
					<td align="center"class="row2" height="1"><img src="${contextPath}/templates/${templateName}/images/spacer.gif" alt="" width="1" height="1" /></td>
				</tr>
				
				<tr>
					<td><span class="gen"><b>${I18n.getMessage("Karma.queryByPeriod")}:</b></span></td>
				</tr>

				<tr>
					<td>
						<span class="gen">
						${I18n.getMessage("Karma.firstDate")}: <input class="post" type="text" maxlength="10" size="15" name="first_date" value=""/>
						&nbsp;
						${I18n.getMessage("Karma.lastDate")}: <input class="post" type="text"  maxlength="10" size="15" name="last_date" value="" id="last_date"/>
						</span>
					</td>
				</tr>

				<tr>
					<td>
						<span class="gen">
						${I18n.getMessage("Karma.orderBy")}:&nbsp;
						<input type="radio" name="order_by" value="total" checked="checked" /> ${I18n.getMessage("Karma.totalReceived")}
						&nbsp;<input type="radio" name="order_by" value="votes_received"/> ${I18n.getMessage("Karma.votesReceived")}
						&nbsp;<input type="radio" name="order_by" value="votes_given"/> ${I18n.getMessage("Karma.votesGiven")}
						&nbsp;<input type="radio" name="order_by" value="user_karma"/> ${I18n.getMessage("Karma.karma")}
						</span>
					</td>
				</tr>

				<tr>
					<td align="center">
						<input type="submit" value="${I18n.getMessage("PostForm.submit")}" class="mainoption" />
					</td>
				</tr>
			</table>
				</form>
		</td>
	</tr>
</table>
